import Toast from '@vant/weapp/toast/toast';

export function checkIfLogin(){
  const token = wx.getStorageSync('token')
  if(!token){
    Toast.fail('请先登录!');
    setTimeout(function(){
      // wx.switchTab({
      //   url: '/pages/profile/profile',
      // })
      wx.navigateTo({
        url: '/pages/login/login',
      })
    },2000)
  }  
}

